#ifndef _TP_MAP_H_
#define _TP_MAP_H_

typedef int TPCalibrateParam;

typedef struct {
	u16         x;
	u16         y;
	u16         touch;
	u16         validity;
} TPData;


#define TP_TOUCH_OFF      0      //  Touch panel is not being touched
#define TP_TOUCH_ON       1      //  Touch panel is being touched

#define TP_VALIDITY_VALID         0        // Valid data
#define TP_VALIDITY_INVALID_X     1        // X coordinate data is invalid
#define TP_VALIDITY_INVALID_Y     2        // Y coordinate data is invalid
#define TP_VALIDITY_INVALID_XY   (TP_VALIDITY_INVALID_X | TP_VALIDITY_INVALID_Y)   // X, Y coordinate data are both invalid


void TP_Init( void );
BOOL TP_GetUserInfo( TPCalibrateParam* calibrate );
void TP_SetCalibrateParam( const TPCalibrateParam * param );
u32 TP_RequestRawSampling( TPData * result );
void TP_GetCalibratedPoint( TPData * disp, const TPData * raw );


//used by WndProc to send us the mouse values
void __TP_setData(int x, int y, int press);

#endif //_TP_MAP_H_